<div id="task-navigation">

  <div id="task-action">
    <% if @controller.action_name == 'calendar' %>
      <div class="tab active">カレンダー</div>
      <div class="tab inactive"><%= link_to 'リスト', list_tasks_url(link_params) %></div>
    <% else %>
      <div class="tab inactive"><%= link_to 'カレンダー', calendar_tasks_url(link_params) %></div>
      <div class="tab active">リスト</div>
    <% end %>
  </div>

  <div id="task-options">

    <span id="task-date">
      <%= link_to '&lt;', link_params.merge(:date => @date.last_month.strftime('%Y%m')) %>
      <span class="date"><%=h sprintf('%d年 %d月', @date.year, @date.month) %></span>
      <%= link_to '&gt;', link_params.merge(:date => @date.next_month.strftime('%Y%m')) %>
      <span class="today">
        <% if @date.year == @today.year && @date.month == @today.month %>
          今日
        <% else %>
          <%= link_to '今日', params.merge(:date => today.strftime('%Y%m')) %>
        <% end %>
      </span>
    </span>

    <span id="task-team">
      チーム:
      <%= select_tag :team, options_for_select([['すべて', 'all']].concat(@teams.map {|team| [team.name, team.id.to_s]}), params[:team]), :id => 'team-select' %>
    </span>

    <span id="task-member">
      メンバー:
      <%= select_tag :member, options_for_select([['全員', 'all']].concat(@members.map {|member| [member.name, member.id.to_s]}), params[:member]), :id => 'member-select' %>
    </span>

    <% if @member.nil? %>
    <span id="task-view">
      <% if @view == :member %>
        担当者別
        /
        <%= link_to('統合', link_params.merge(:view => 'all')) %>
      <% else %>
        <%=  link_to('担当者別', link_params.merge(:view => 'member')) %>
        /
        統合
      <% end %>
    </span>
    <% end %>
  </div>

</div>